# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=htmlq
pkgver=0.4.0
pkgrel=1
pkgdesc="Like jq, but for HTML"
url="https://github.com/mgdm/htmlq"
license="MIT"
arch="all"
makedepends="cargo cargo-auditable"
source="https://github.com/mgdm/htmlq/archive/v$pkgver/htmlq-$pkgver.tar.gz
	update-libc.patch
	"

prepare() {
	default_prepare
	cargo fetch --target="$CTARGET" --locked
}

build() {
	cargo auditable build --release --locked
}

check() {
	cargo test --locked
}

package() {
	install -Dm755 target/release/htmlq "$pkgdir"/usr/bin/htmlq
}

sha512sums="
3cbb53b66ca894b17c95487fe33a11587449af1b0acd5fa9e804b046e15fdd50a997b5367d0b00c20dce2587cfdf9d15b75cdd97007082928228a53b2f12fde7  htmlq-0.4.0.tar.gz
df5f091b94629bc62372d48aa2c097a9d0ac80f829ee1cb1e2eb9bd7131a8851890b5701e71377d3fc609dbc31878307b59e808f5e46af8573b8fce285bb28f0  update-libc.patch
"
